package com.gulimall.auth.feign;

import com.atguigu.common.utils.R;
import com.atguigu.common.vo.SocialVO;
import com.gulimall.auth.feign.impl.MemberFeignServiceFallback;
import com.gulimall.auth.vo.UserLoginVo;
import com.gulimall.auth.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Description
 * @Author lhj
 * @Date 2024/3/2 20:11
 */

@FeignClient(name = "gulimall-member", contextId = "MemberFeignService" ,fallback = MemberFeignServiceFallback.class)
public interface MemberFeignService {

    /**
     * 登录接口
     * @param userLoginVo 登录数据
     * @return  r
     */
    @PostMapping("/member/member/login")
    public R login(@RequestBody UserLoginVo userLoginVo);

    /**
     * 注册用户会员
     * @param registerMemberVo 请求参数
     * @return r
     */
    @PostMapping("member/member/register")
    R registerMember(@RequestBody UserRegisterVo registerMemberVo);

    /**
     * 微博社交登录接口
     * @param socialVO token信息
     * @return r
     */
    @PostMapping("member/member/social/login")
    R socialLogin(@RequestBody SocialVO socialVO);
}
